package forumSystem;

import msgParser.Strings;


public class ForumPolicy {
	
	private int whenNotify;
	private int whoNotify;
	private int howOften;

	private int deletePostPermission;
	private int addModeratorPermission;
	private int removeModeratorPermission;
	
	private int badWordsPolicy;
	private int securityPolicy;
	
	public ForumPolicy(int whenNotify, int whoNotify, int howOften, int deletePostPermission, 
			int addModeratorPermission, int removeModeratorPermission, int securityPolicy, int badWordsPolicy) {
		this.whenNotify = whenNotify;
		this.setWhoNotify(whoNotify);
		this.setHowOften(howOften);
		this.deletePostPermission = deletePostPermission;
		this.addModeratorPermission = addModeratorPermission;
		this.removeModeratorPermission = removeModeratorPermission;
		this.setSecurityPolicy(securityPolicy);
		this.badWordsPolicy = badWordsPolicy;
	}
	
	public int getBadWordsPolicy() {
		return badWordsPolicy;
	}

	public void setBadWordsPolicy(int badWordsPolicy) {
		this.badWordsPolicy = badWordsPolicy;
	}

	public void setHowOften (int value){
		if (whenNotify == Strings.PERIOD_NOTIFY)
			howOften = value;
	}
	
	public int getHowOften() {
		return howOften;
	}
	
	public int getWhoNotify() {
		return whoNotify;
	}

	public void setWhoNotify(int whoNotify) {
		this.whoNotify = whoNotify;
	}
	
	public int getWhenNotify() {
		return whenNotify;
	}

	public void setWhenNotify(int whenNotify) {
		this.whenNotify = whenNotify;
	}

	public int getDeletePostPermission() {
		return deletePostPermission;
	}

	public void setDeletePostPermission(int deletePostPermission) {
		this.deletePostPermission = deletePostPermission;
	}

	public int getAddModeratorPermission() {
		return addModeratorPermission;
	}

	public void setAddModeratorPermission(int addModeratorPermission) {
		this.addModeratorPermission = addModeratorPermission;
	}

	public int getRemoveModeratorPermission() {
		return removeModeratorPermission;
	}

	public void setRemoveModeratorPermission(int removeModeratorPermission) {
		this.removeModeratorPermission = removeModeratorPermission;
	}

	public int getSecurityPolicy() {
		return securityPolicy;
	}

	public void setSecurityPolicy(int securityPolicy) {
		this.securityPolicy = securityPolicy;
	}
}